<template>
  <div id="wrapper">
    <main>
       <div class="container">
         <el-button type="primary" @click="openVideo">打开视频</el-button>
         <el-button type="success" @click="openPdf">打开PDF</el-button>
<!--         <el-radio-group v-model="radio" class="radio-group">-->
<!--           <el-radio-button :label="0">视频播放</el-radio-button>-->
<!--           <el-radio-button :label="1">PDF加载</el-radio-button>-->
<!--         </el-radio-group>-->
<!--         <div class="video" v-if="radio === 0">-->
<!--           <video width="500" src="https://blz-videos.nosdn.127.net/1/OverWatch/OVR_D.VA_SHOOTING_STAR_zhCN_YT_PC_3.mp4" controls="controls"/>-->
<!--         </div>-->
<!--         <div class="pdf" v-else>-->
<!--           <iframe width="500" height="600" src="/static/pdfjs/web/viewer.html?file=http://www.africau.edu/images/default/sample.pdf"></iframe>-->
<!--         </div>-->
       </div>
    </main>
  </div>
</template>

<script>
  import {ipcRenderer} from 'electron'
  import SystemInformation from './LandingPage/SystemInformation'

  export default {
    name: 'landing-page',
    data() {
      return {
        password: '',
      }
    },
    components: { SystemInformation },
    methods: {
      openVideo() {
        this.$router.push({path: '/video'});
      },
      openPdf() {
        this.$router.push({path: '/pdf'});
      }
    },
    mounted() {

      // PDFObject.embed("http://www.gov.cn/zhengce/pdfFile/2021_PDF.pdf", "#example1");
      // ipcRenderer.on('config-success', function(event, message) {
      //   alert(message); // Prints "whoooooooh!"
      // });
    }
  }
</script>

<style>
  @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body { font-family: 'Source Sans Pro', sans-serif; }
  .container{
    width: 600px;
    margin: 20px auto;
    text-align: center;
  }
  .video, .pdf{
    margin-top: 20px;
  }
  .pdf .red{
    color: red;
  }
  main {
    display: flex;
    justify-content: space-between;
  }

  main > div { flex-basis: 50%; }

</style>
